package com.example.adminvue.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.adminvue.domain.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MenuMapper extends BaseMapper<Menu> {
    List<String> selectPermsByUserId(Long userid);

    List<Menu> selectMenuTreeAll();

    List<Menu> selectMenuTreeByUserId(Long userId);

    List<Menu> selectMenuList(Menu menu);

    List<Menu> selectMenuListByUserId(Menu menu);

    public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);

    List<Long> menuListByRoleId(Long roleId);

    List<Long> allMenuIds();
}
